package com.rzico.basics.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.basics.entity.TurntablePrize;
import com.rzico.basics.mapper.TurntablePrizeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.alibaba.druid.sql.ast.SQLPartitionValue.Operator.List;

/**
 * <pre>
 * 营销活动奖品业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class TurntablePrizeService extends BaseServiceImpl<TurntablePrize, String> {

    @Autowired
    private TurntablePrizeMapper turntablePrizeMapper;

    @Override
    public BaseMapper<TurntablePrize, String> getMapper() {
        return turntablePrizeMapper;
    }

    /**
     * 根据大转盘ID 删除对于的奖品
     *
     * @param turntableId 大转盘ID
     */
    public int deleteByTurntableId(Long turntableId, List<Long> editIds) {
        return turntablePrizeMapper.deleteByTurntableId(turntableId, editIds);
    }

}
